package com.hb.trade.server.project.archive.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hb.core.pojo.Attachment;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.project.archive.dto.ArchiveCommonFileDTO;
import com.hb.core.pojo.project.archive.dto.ProjectArchiveFileDTO;
import com.hb.core.pojo.project.archive.entity.ProjectArchiveFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author yuezheng
 * @since 2022-02-17
 */
public interface ProjectArchiveFileService extends IService<ProjectArchiveFile> {


    /**
     * 根据归档id 查询所有文件
     *
     * @param projectArchiveFileDTO
     * @return
     */
    Attachments getAttachmentBySectionId(ProjectArchiveFileDTO projectArchiveFileDTO);



    /**
     * 查询归档下所有文件类型和文件
     *
     * @return map
     * @param projectArchiveFileDTO
     */
    List<ArchiveCommonFileDTO> getArchiveFileList(ProjectArchiveFileDTO projectArchiveFileDTO);

    /**
     * 添加文件
     *
     * @Param: projectArchiveDetailDTO
     * @return: Message<Boolean>
     * @Author: 岳争
     * @Date: 2022/2/17
     */
    int addArchiveType(ProjectArchiveFile projectArchiveFile);

    /**
     * 向类别中添加文件
     *
     * @param projectArchiveFile
     * @return
     */
    int addArchiveFile(ProjectArchiveFile projectArchiveFile);

    /**
     * 删除单个文件
     *
     * @param projectArchiveFileDTO
     * @return
     */
    int removeFile(ProjectArchiveFileDTO projectArchiveFileDTO);

    /**
     * 删除整个文件类型
     *
     * @Param: projectArchiveDetailDTO
     * @return: ResponseDto
     * @Author: 岳争
     * @Date: 2022/2/17
     */
    public int removeType(ProjectArchiveFileDTO projectArchiveFileDTO);
}
